This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
Subject: Error: 213 - Excel object error. Run on server. UNC path
Feedback Type: Problem
Product Area: Domino Server
Technical Area: Application Development
Platform: Windows
Release: 8.5.3
Reproducible: Always
Agent is run on server and Excel is installed on the server. Same code runs successfully from Lotus Notes client. Error is only thrown when run on the server. Agent security level is 3 and signer has unrestricted rights.
Here is the error recorded in an agent log:
Error: 213: Microsoft Excel: Microsoft Excel cannot access the file '\\appsrv01\SS\INVEXCEL\ITEMH.XLS'. There are several possible reasons:
• The file name or path does not exist.
• The file is being used by another program.
• The workbook you are trying to save has the same name as a currently open workbook.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I can open the file using the unc path when running Excel interactively on the server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The string variable filenameNew$ is:
\\appsrv01\SS\INVEXCEL\ITEMH.XLS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here is code:
'*****
' Detach Excel Template File to filenameNew$ path above.
'*****
Set object = docProfile.GetAttachment(filename$)
Call object.ExtractFile(filenameNew$)
'******
' Excel object creation and opening template workbook
'******
Dim oexcel As Variant
Dim oworkbook As Variant
Set oexcel = CreateObject("Excel.Application")
oexcel.Visible = False
'<<<Error is thrown on next line>>>'
Set oworkbook = oexcel.Workbooks.Open(filenameNew$)
...
Feedback number WEBB8QMQZ7 created by ~Carol Nontooings on 01/18/2012
Status: Open
Comments: